home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1994-09-25 | 10.1 KB | [TEXT/KAHL] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
10%
| dexvert
| Jesper Olsen Module (music/jesperOlsen)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Sun Sep 25 18:47:30 1994, modified Sun Sep 25 18:47:30 1994, creator Think C, type ASCII, 9598 bytes "Main.c" , at 0x25fe 530 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
49%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
33%
| TrID
| TTComp archive compressed (bin-4K)
| default (weak)
| |
16%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [KAHL] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 06 4d 61 69 6e 2e 63 | 00 00 00 00 00 00 00 00 |..Main.c|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 01 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 25 7e 00 | 00 02 12 aa ab ae 82 aa |.....%~.|........|
|00000060| ab ae 82 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 3c b4 00 00 |........|....<...|
|00000080| 2f 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |/*******|********|
|00000090| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000c0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000d0| 2a 2a 2a 2a 2a 0d 20 2a | 20 4d 61 69 6e 2e 63 0d |*****. *| Main.c.|
|000000e0| 20 2a 0d 20 2a 20 66 72 | 6f 6d 20 48 65 78 45 64 | *. * fr|om HexEd|
|000000f0| 69 74 2c 20 61 20 73 69 | 6d 70 6c 65 20 68 65 78 |it, a si|mple hex|
|00000100| 20 65 64 69 74 6f 72 0d | 20 2a 20 63 6f 70 79 72 | editor.| * copyr|
|00000110| 69 67 68 74 20 31 39 39 | 33 2c 20 4a 69 6d 20 42 |ight 199|3, Jim B|
|00000120| 75 6d 67 61 72 64 6e 65 | 72 0d 20 2a 0d 20 2a 20 |umgardne|r. *. * |
|00000130| 52 65 76 69 73 69 6f 6e | 20 48 69 73 74 6f 72 79 |Revision| History|
|00000140| 20 69 73 20 69 6e 20 48 | 69 73 74 6f 72 79 2e 6e | is in H|istory.n|
|00000150| 6f 74 65 0d 20 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |ote. ***|********|
|00000160| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000170| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000180| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000190| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000001a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2f 0d 23 69 6e 63 6c |********|*/.#incl|
|000001b0| 75 64 65 20 22 48 65 78 | 45 64 69 74 2e 68 22 0d |ude "Hex|Edit.h".|
|000001c0| 23 69 6e 63 6c 75 64 65 | 20 22 41 70 70 6c 65 45 |#include| "AppleE|
|000001d0| 76 65 6e 74 73 2e 68 22 | 0d 23 69 6e 63 6c 75 64 |vents.h"|.#includ|
|000001e0| 65 20 3c 54 72 61 70 73 | 2e 68 3e 0d 0d 0d 76 6f |e <Traps|.h>...vo|
|000001f0| 69 64 20 09 4d 79 49 6e | 69 74 4d 61 63 69 6e 74 |id .MyIn|itMacint|
|00000200| 6f 73 68 28 76 6f 69 64 | 29 3b 0d 76 6f 69 64 09 |osh(void|);.void.|
|00000210| 4d 79 49 6e 69 74 4d 75 | 6c 74 69 66 69 6e 64 65 |MyInitMu|ltifinde|
|00000220| 72 28 76 6f 69 64 29 3b | 0d 76 6f 69 64 20 09 49 |r(void);|.void .I|
|00000230| 6e 69 74 41 70 70 6c 65 | 45 76 65 6e 74 73 28 76 |nitApple|Events(v|
|00000240| 6f 69 64 29 3b 0d 76 6f | 69 64 09 43 68 65 63 6b |oid);.vo|id.Check|
|00000250| 45 6e 76 69 72 6f 6e 6d | 65 6e 74 28 76 6f 69 64 |Environm|ent(void|
|00000260| 29 3b 0d 76 6f 69 64 20 | 09 4d 79 48 61 6e 64 6c |);.void |.MyHandl|
|00000270| 65 45 76 65 6e 74 28 76 | 6f 69 64 29 3b 0d 76 6f |eEvent(v|oid);.vo|
|00000280| 69 64 20 09 4d 79 44 6f | 45 76 65 6e 74 28 45 76 |id .MyDo|Event(Ev|
|00000290| 65 6e 74 52 65 63 6f 72 | 64 20 2a 74 68 65 45 76 |entRecor|d *theEv|
|000002a0| 65 6e 74 29 3b 0d 76 6f | 69 64 09 49 64 6c 65 4f |ent);.vo|id.IdleO|
|000002b0| 62 6a 65 63 74 73 28 45 | 76 65 6e 74 52 65 63 6f |bjects(E|ventReco|
|000002c0| 72 64 20 2a 65 72 29 3b | 0d 0d 42 6f 6f 6c 65 61 |rd *er);|..Boolea|
|000002d0| 6e 09 67 57 4e 45 49 6d | 70 6c 65 6d 65 6e 74 65 |n.gWNEIm|plemente|
|000002e0| 64 2c 67 51 75 69 74 46 | 6c 61 67 2c 67 53 79 73 |d,gQuitF|lag,gSys|
|000002f0| 37 46 6c 61 67 2c 67 43 | 6f 6c 6f 72 51 44 46 6c |7Flag,gC|olorQDFl|
|00000300| 61 67 3b 0d 2f 2f 20 54 | 79 70 69 63 61 6c 20 4d |ag;.// T|ypical M|
|00000310| 61 63 69 6e 74 6f 73 68 | 20 49 6e 69 74 69 61 6c |acintosh| Initial|
|00000320| 69 7a 61 74 69 6f 6e 20 | 43 6f 64 65 0d 0d 0d 2f |ization |Code.../|
|00000330| 2f 20 4d 61 69 6e 20 45 | 6e 74 72 79 20 50 6f 69 |/ Main E|ntry Poi|
|00000340| 6e 74 0d 0d 6d 61 69 6e | 28 29 0d 7b 0d 09 2f 2f |nt..main|().{..//|
|00000350| 20 53 74 61 6e 64 61 72 | 64 20 4d 61 63 20 49 6e | Standar|d Mac In|
|00000360| 69 74 69 61 6c 69 7a 61 | 74 69 6f 6e 0d 09 4d 79 |itializa|tion..My|
|00000370| 49 6e 69 74 4d 61 63 69 | 6e 74 6f 73 68 28 29 3b |InitMaci|ntosh();|
|00000380| 0d 0d 09 2f 2f 20 43 68 | 65 63 6b 20 69 66 20 4d |...// Ch|eck if M|
|00000390| 75 6c 74 69 66 69 6e 64 | 65 72 20 28 57 61 69 74 |ultifind|er (Wait|
|000003a0| 4e 65 78 74 45 76 65 6e | 74 29 20 69 73 20 69 6d |NextEven|t) is im|
|000003b0| 70 6c 65 6d 65 6e 74 65 | 64 0d 09 4d 79 49 6e 69 |plemente|d..MyIni|
|000003c0| 74 4d 75 6c 74 69 66 69 | 6e 64 65 72 28 29 3b 0d |tMultifi|nder();.|
|000003d0| 0d 09 2f 2f 20 43 68 65 | 63 6b 20 69 66 20 53 79 |..// Che|ck if Sy|
|000003e0| 73 74 65 6d 20 37 0d 09 | 43 68 65 63 6b 45 6e 76 |stem 7..|CheckEnv|
|000003f0| 69 72 6f 6e 6d 65 6e 74 | 28 29 3b 0d 0d 09 2f 2f |ironment|();...//|
|00000400| 20 49 6e 69 74 20 41 70 | 70 6c 65 20 45 76 65 6e | Init Ap|ple Even|
|00000410| 74 73 0d 09 49 6e 69 74 | 41 70 70 6c 65 45 76 65 |ts..Init|AppleEve|
|00000420| 6e 74 73 28 29 3b 0d 0d | 09 2f 2f 20 53 65 74 20 |nts();..|.// Set |
|00000430| 75 70 20 74 68 65 20 6d | 65 6e 75 20 62 61 72 0d |up the m|enu bar.|
|00000440| 09 4d 79 53 65 74 55 70 | 4d 65 6e 75 73 28 29 3b |.MySetUp|Menus();|
|00000450| 0d 0d 09 49 6e 69 74 69 | 61 6c 69 7a 65 45 64 69 |...Initi|alizeEdi|
|00000460| 74 6f 72 28 29 3b 0d 0d | 09 69 66 20 28 21 67 53 |tor();..|.if (!gS|
|00000470| 79 73 37 46 6c 61 67 29 | 0d 09 09 41 73 6b 45 64 |ys7Flag)|...AskEd|
|00000480| 69 74 57 69 6e 64 6f 77 | 28 29 3b 0d 0d 09 2f 2f |itWindow|();...//|
|00000490| 20 6d 61 69 6e 20 65 76 | 65 6e 74 20 6c 6f 6f 70 | main ev|ent loop|
|000004a0| 0d 09 77 68 69 6c 65 20 | 28 21 67 51 75 69 74 46 |..while |(!gQuitF|
|000004b0| 6c 61 67 29 09 09 09 2f | 2f 20 54 69 6c 6c 20 74 |lag).../|/ Till t|
|000004c0| 68 65 20 45 6e 64 20 6f | 66 20 54 69 6d 65 2e 2e |he End o|f Time..|
|000004d0| 2e 0d 09 09 4d 79 48 61 | 6e 64 6c 65 45 76 65 6e |....MyHa|ndleEven|
|000004e0| 74 28 29 3b 09 09 2f 2f | 20 47 65 74 20 61 6e 20 |t();..//| Get an |
|000004f0| 45 76 65 6e 74 2c 20 64 | 6f 20 73 6f 6d 65 74 68 |Event, d|o someth|
|00000500| 69 6e 67 20 61 62 6f 75 | 74 20 69 74 0d 0d 09 43 |ing abou|t it...C|
|00000510| 6c 65 61 6e 75 70 45 64 | 69 74 6f 72 28 29 3b 0d |leanupEd|itor();.|
|00000520| 7d 0d 0d 2f 2f 20 53 74 | 61 6e 64 61 72 64 20 4d |}..// St|andard M|
|00000530| 61 63 69 6e 74 6f 73 68 | 20 49 6e 69 74 69 61 6c |acintosh| Initial|
|00000540| 69 7a 61 74 69 6f 6e 0d | 0d 76 6f 69 64 20 4d 79 |ization.|.void My|
|00000550| 49 6e 69 74 4d 61 63 69 | 6e 74 6f 73 68 28 76 6f |InitMaci|ntosh(vo|
|00000560| 69 64 29 0d 7b 0d 09 4d | 61 78 41 70 70 6c 5a 6f |id).{..M|axApplZo|
|00000570| 6e 65 28 29 3b 0d 09 0d | 09 49 6e 69 74 47 72 61 |ne();...|.InitGra|
|00000580| 66 28 26 74 68 65 50 6f | 72 74 29 3b 0d 09 49 6e |f(&thePo|rt);..In|
|00000590| 69 74 46 6f 6e 74 73 28 | 29 3b 0d 09 46 6c 75 73 |itFonts(|);..Flus|
|000005a0| 68 45 76 65 6e 74 73 28 | 65 76 65 72 79 45 76 65 |hEvents(|everyEve|
|000005b0| 6e 74 2c 20 30 29 3b 0d | 09 49 6e 69 74 57 69 6e |nt, 0);.|.InitWin|
|000005c0| 64 6f 77 73 28 29 3b 0d | 09 49 6e 69 74 4d 65 6e |dows();.|.InitMen|
|000005d0| 75 73 28 29 3b 0d 09 54 | 45 49 6e 69 74 28 29 3b |us();..T|EInit();|
|000005e0| 0d 09 49 6e 69 74 44 69 | 61 6c 6f 67 73 28 30 4c |..InitDi|alogs(0L|
|000005f0| 29 3b 0d 09 49 6e 69 74 | 43 75 72 73 6f 72 28 29 |);..Init|Cursor()|
|00000600| 3b 0d 7d 0d 0d 2f 2f 20 | 43 68 65 63 6b 20 69 66 |;.}..// |Check if|
|00000610| 20 57 61 69 74 4e 65 78 | 74 45 76 65 6e 74 20 28 | WaitNex|tEvent (|
|00000620| 4d 75 6c 74 69 66 69 6e | 64 65 72 29 20 69 73 20 |Multifin|der) is |
|00000630| 69 6d 70 6c 65 6d 65 6e | 74 65 64 20 6f 6e 20 74 |implemen|ted on t|
|00000640| 68 69 73 20 4d 61 63 69 | 6e 74 6f 73 68 0d 0d 76 |his Maci|ntosh..v|
|00000650| 6f 69 64 20 4d 79 49 6e | 69 74 4d 75 6c 74 69 66 |oid MyIn|itMultif|
|00000660| 69 6e 64 65 72 28 76 6f | 69 64 29 0d 7b 0d 09 67 |inder(vo|id).{..g|
|00000670| 57 4e 45 49 6d 70 6c 65 | 6d 65 6e 74 65 64 20 3d |WNEImple|mented =|
|00000680| 20 28 4e 47 65 74 54 72 | 61 70 41 64 64 72 65 73 | (NGetTr|apAddres|
|00000690| 73 28 5f 57 61 69 74 4e | 65 78 74 45 76 65 6e 74 |s(_WaitN|extEvent|
|000006a0| 2c 20 54 6f 6f 6c 54 72 | 61 70 29 20 21 3d 20 0d |, ToolTr|ap) != .|
|000006b0| 09 09 09 09 09 20 20 20 | 4e 47 65 74 54 72 61 70 |..... |NGetTrap|
|000006c0| 41 64 64 72 65 73 73 28 | 5f 55 6e 69 6d 70 6c 65 |Address(|_Unimple|
|000006d0| 6d 65 6e 74 65 64 2c 54 | 6f 6f 6c 54 72 61 70 29 |mented,T|oolTrap)|
|000006e0| 29 3b 0d 7d 0d 0d 2f 2f | 20 54 68 65 20 4d 61 69 |);.}..//| The Mai|
|000006f0| 6e 20 45 76 65 6e 74 20 | 44 69 73 70 61 74 63 68 |n Event |Dispatch|
|00000700| 65 72 20 2d 20 74 68 69 | 73 20 72 6f 75 74 69 6e |er - thi|s routin|
|00000710| 65 20 73 68 6f 75 6c 64 | 20 62 65 20 63 61 6c 6c |e should| be call|
|00000720| 65 64 20 72 65 70 65 61 | 74 65 64 6c 79 0d 0d 76 |ed repea|tedly..v|
|00000730| 6f 69 64 20 4d 79 48 61 | 6e 64 6c 65 45 76 65 6e |oid MyHa|ndleEven|
|00000740| 74 28 76 6f 69 64 29 0d | 0d 7b 0d 09 45 76 65 6e |t(void).|.{..Even|
|00000750| 74 52 65 63 6f 72 64 09 | 74 68 65 45 76 65 6e 74 |tRecord.|theEvent|
|00000760| 3b 0d 09 42 6f 6f 6c 65 | 61 6e 09 09 6f 6b 3b 0d |;..Boole|an..ok;.|
|00000770| 0d 09 2f 2f 20 49 66 20 | 74 68 65 20 6d 6f 72 65 |..// If |the more|
|00000780| 20 6d 6f 64 65 72 6e 20 | 57 61 69 74 4e 65 78 74 | modern |WaitNext|
|00000790| 45 76 65 6e 74 20 69 73 | 20 69 6d 70 6c 65 6d 65 |Event is| impleme|
|000007a0| 6e 74 65 64 2c 20 75 73 | 65 20 69 74 20 0d 0d 09 |nted, us|e it ...|
|000007b0| 69 66 20 28 67 57 4e 45 | 49 6d 70 6c 65 6d 65 6e |if (gWNE|Implemen|
|000007c0| 74 65 64 29 0d 09 09 2f | 2f 20 57 65 20 64 6f 6e |ted).../|/ We don|
|000007d0| 27 74 20 68 61 76 65 20 | 74 6f 20 63 61 6c 6c 20 |'t have |to call |
|000007e0| 53 79 73 74 65 6d 54 61 | 73 6b 20 62 65 63 61 75 |SystemTa|sk becau|
|000007f0| 73 65 20 57 61 69 74 4e | 65 78 74 45 76 65 6e 74 |se WaitN|extEvent|
|00000800| 20 63 61 6c 6c 73 20 69 | 74 20 66 6f 72 20 75 73 | calls i|t for us|
|00000810| 0d 09 09 2f 2f 20 47 65 | 74 20 74 68 65 20 6e 65 |...// Ge|t the ne|
|00000820| 78 74 20 65 76 65 6e 74 | 0d 09 09 6f 6b 20 3d 20 |xt event|...ok = |
|00000830| 57 61 69 74 4e 65 78 74 | 45 76 65 6e 74 28 65 76 |WaitNext|Event(ev|
|00000840| 65 72 79 45 76 65 6e 74 | 2c 26 74 68 65 45 76 65 |eryEvent|,&theEve|
|00000850| 6e 74 2c 30 4c 2c 4e 55 | 4c 4c 29 3b 0d 0d 09 65 |nt,0L,NU|LL);...e|
|00000860| 6c 73 65 20 7b 0d 09 09 | 2f 2f 20 77 65 20 61 72 |lse {...|// we ar|
|00000870| 65 20 72 75 6e 6e 69 6e | 67 20 69 6e 20 28 53 69 |e runnin|g in (Si|
|00000880| 6e 67 6c 65 29 20 46 69 | 6e 64 65 72 20 75 6e 64 |ngle) Fi|nder und|
|00000890| 65 72 20 73 79 73 74 65 | 6d 20 36 20 6f 72 20 6c |er syste|m 6 or l|
|000008a0| 65 73 73 0d 09 09 2f 2f | 20 47 69 76 65 20 44 65 |ess...//| Give De|
|000008b0| 73 6b 20 41 63 63 65 73 | 73 6f 72 69 65 73 20 73 |sk Acces|sories s|
|000008c0| 6f 6d 65 20 70 72 6f 63 | 65 73 73 69 6e 67 20 74 |ome proc|essing t|
|000008d0| 69 6d 65 0d 09 09 53 79 | 73 74 65 6d 54 61 73 6b |ime...Sy|stemTask|
|000008e0| 20 28 29 3b 0d 0d 09 09 | 2f 2f 20 47 65 74 20 74 | ();....|// Get t|
|000008f0| 68 65 20 6e 65 78 74 20 | 65 76 65 6e 74 0d 09 09 |he next |event...|
|00000900| 6f 6b 20 3d 20 47 65 74 | 4e 65 78 74 45 76 65 6e |ok = Get|NextEven|
|00000910| 74 20 28 65 76 65 72 79 | 45 76 65 6e 74 2c 20 26 |t (every|Event, &|
|00000920| 74 68 65 45 76 65 6e 74 | 29 3b 0d 09 7d 0d 0d 09 |theEvent|);..}...|
|00000930| 69 66 20 28 49 73 44 69 | 61 6c 6f 67 45 76 65 6e |if (IsDi|alogEven|
|00000940| 74 28 26 74 68 65 45 76 | 65 6e 74 29 29 20 7b 0d |t(&theEv|ent)) {.|
|00000950| 09 09 44 6f 4d 6f 64 65 | 6c 65 73 73 44 69 61 6c |..DoMode|lessDial|
|00000960| 6f 67 45 76 65 6e 74 28 | 26 74 68 65 45 76 65 6e |ogEvent(|&theEven|
|00000970| 74 29 3b 0d 09 7d 0d 09 | 65 6c 73 65 20 69 66 20 |t);..}..|else if |
|00000980| 28 6f 6b 29 20 7b 0d 09 | 09 09 2f 2f 20 48 61 6e |(ok) {..|..// Han|
|00000990| 64 6c 65 20 74 68 65 20 | 45 76 65 6e 74 0d 09 09 |dle the |Event...|
|000009a0| 09 4d 79 44 6f 45 76 65 | 6e 74 28 26 74 68 65 45 |.MyDoEve|nt(&theE|
|000009b0| 76 65 6e 74 29 3b 0d 09 | 7d 0d 09 65 6c 73 65 20 |vent);..|}..else |
|000009c0| 7b 0d 09 09 2f 2f 20 4e | 6f 74 68 69 6e 67 20 68 |{...// N|othing h|
|000009d0| 61 70 70 65 6e 65 64 2c | 20 6b 69 63 6b 20 62 61 |appened,| kick ba|
|000009e0| 63 6b 2e 2e 2e 0d 09 09 | 49 64 6c 65 4f 62 6a 65 |ck......|IdleObje|
|000009f0| 63 74 73 28 26 74 68 65 | 45 76 65 6e 74 29 3b 0d |cts(&the|Event);.|
|00000a00| 09 7d 0d 7d 0d 0d 0d 76 | 6f 69 64 20 4d 79 44 6f |.}.}...v|oid MyDo|
|00000a10| 45 76 65 6e 74 28 45 76 | 65 6e 74 52 65 63 6f 72 |Event(Ev|entRecor|
|00000a20| 64 20 2a 74 68 65 45 76 | 65 6e 74 29 0d 7b 0d 09 |d *theEv|ent).{..|
|00000a30| 73 68 6f 72 74 20 09 09 | 77 69 6e 64 6f 77 43 6f |short ..|windowCo|
|00000a40| 64 65 3b 0d 09 57 69 6e | 64 6f 77 50 74 72 09 74 |de;..Win|dowPtr.t|
|00000a50| 68 65 57 69 6e 64 6f 77 | 3b 0d 0d 0d 09 73 77 69 |heWindow|;....swi|
|00000a60| 74 63 68 20 28 74 68 65 | 45 76 65 6e 74 2d 3e 77 |tch (the|Event->w|
|00000a70| 68 61 74 29 20 7b 0d 09 | 2f 2f 0d 09 2f 2f 20 57 |hat) {..|//..// W|
|00000a80| 61 73 20 74 68 65 20 6d | 6f 75 73 65 20 62 75 74 |as the m|ouse but|
|00000a90| 74 6f 6e 20 70 72 65 73 | 73 65 64 3f 0d 09 63 61 |ton pres|sed?..ca|
|00000aa0| 73 65 20 6d 6f 75 73 65 | 44 6f 77 6e 3a 0d 09 09 |se mouse|Down:...|
|00000ab0| 2f 2f 20 46 69 6e 64 20 | 6f 75 74 20 77 68 65 72 |// Find |out wher|
|00000ac0| 65 20 74 68 65 20 6d 6f | 75 73 65 20 77 65 6e 74 |e the mo|use went|
|00000ad0| 20 64 6f 77 6e 0d 09 09 | 77 69 6e 64 6f 77 43 6f | down...|windowCo|
|00000ae0| 64 65 20 3d 20 46 69 6e | 64 57 69 6e 64 6f 77 20 |de = Fin|dWindow |
|00000af0| 28 74 68 65 45 76 65 6e | 74 2d 3e 77 68 65 72 65 |(theEven|t->where|
|00000b00| 2c 20 26 74 68 65 57 69 | 6e 64 6f 77 29 3b 0d 0d |, &theWi|ndow);..|
|00000b10| 09 20 20 09 73 77 69 74 | 63 68 20 28 77 69 6e 64 |. .swit|ch (wind|
|00000b20| 6f 77 43 6f 64 65 29 20 | 7b 0d 09 09 63 61 73 65 |owCode) |{...case|
|00000b30| 20 69 6e 53 79 73 57 69 | 6e 64 6f 77 3a 20 09 2f | inSysWi|ndow: ./|
|00000b40| 2f 20 44 65 73 6b 20 41 | 63 63 65 73 73 6f 72 79 |/ Desk A|ccessory|
|00000b50| 3f 0d 09 09 20 20 20 20 | 53 79 73 74 65 6d 43 6c |?... |SystemCl|
|00000b60| 69 63 6b 20 28 74 68 65 | 45 76 65 6e 74 2c 20 74 |ick (the|Event, t|
|00000b70| 68 65 57 69 6e 64 6f 77 | 29 3b 0d 09 09 20 20 20 |heWindow|);... |
|00000b80| 20 62 72 65 61 6b 3b 0d | 09 09 20 20 20 20 0d 09 | break;.|.. ..|
|00000b90| 09 63 61 73 65 20 69 6e | 4d 65 6e 75 42 61 72 3a |.case in|MenuBar:|
|00000ba0| 09 09 2f 2f 20 4d 65 6e | 75 20 42 61 72 3f 0d 09 |..// Men|u Bar?..|
|00000bb0| 09 20 20 09 4d 79 41 64 | 6a 75 73 74 4d 65 6e 75 |. .MyAd|justMenu|
|00000bc0| 73 28 29 3b 0d 09 09 20 | 20 20 20 4d 79 48 61 6e |s();... | MyHan|
|00000bd0| 64 6c 65 4d 65 6e 75 28 | 4d 65 6e 75 53 65 6c 65 |dleMenu(|MenuSele|
|00000be0| 63 74 28 74 68 65 45 76 | 65 6e 74 2d 3e 77 68 65 |ct(theEv|ent->whe|
|00000bf0| 72 65 29 29 3b 0d 09 09 | 20 20 20 20 62 72 65 61 |re));...| brea|
|00000c00| 6b 3b 0d 0d 09 09 64 65 | 66 61 75 6c 74 3a 09 09 |k;....de|fault:..|
|00000c10| 09 2f 2f 20 43 75 72 73 | 6f 72 20 77 61 73 20 69 |.// Curs|or was i|
|00000c20| 6e 73 69 64 65 20 6f 75 | 72 20 77 69 6e 64 6f 77 |nside ou|r window|
|00000c30| 0d 09 09 09 2f 2f 20 49 | 66 20 74 68 65 20 77 69 |....// I|f the wi|
|00000c40| 6e 64 6f 77 20 69 73 6e | 27 74 20 69 6e 20 74 68 |ndow isn|'t in th|
|00000c50| 65 20 66 72 6f 6e 74 0d | 09 09 09 69 66 20 28 74 |e front.|...if (t|
|00000c60| 68 65 57 69 6e 64 6f 77 | 20 21 3d 20 46 72 6f 6e |heWindow| != Fron|
|00000c70| 74 57 69 6e 64 6f 77 28 | 29 29 20 7b 0d 09 09 09 |tWindow(|)) {....|
|00000c80| 09 2f 2f 20 4d 61 6b 65 | 20 69 74 20 73 6f 2e 2e |.// Make| it so..|
|00000c90| 2e 0d 09 09 09 09 53 65 | 6c 65 63 74 57 69 6e 64 |......Se|lectWind|
|00000ca0| 6f 77 28 74 68 65 57 69 | 6e 64 6f 77 29 3b 0d 09 |ow(theWi|ndow);..|
|00000cb0| 09 09 09 4d 79 41 64 6a | 75 73 74 4d 65 6e 75 73 |...MyAdj|ustMenus|
|00000cc0| 28 29 3b 0d 09 09 09 7d | 0d 09 09 09 65 6c 73 65 |();....}|....else|
|00000cd0| 20 7b 0d 09 09 09 09 2f | 2f 20 57 69 6e 64 6f 77 | {...../|/ Window|
|00000ce0| 20 69 73 20 61 6c 72 65 | 61 64 79 20 69 6e 20 74 | is alre|ady in t|
|00000cf0| 68 65 20 66 72 6f 6e 74 | 2c 20 68 61 6e 64 6c 65 |he front|, handle|
|00000d00| 20 74 68 65 20 63 6c 69 | 63 6b 0d 09 09 09 09 73 | the cli|ck.....s|
|00000d10| 77 69 74 63 68 20 28 77 | 69 6e 64 6f 77 43 6f 64 |witch (w|indowCod|
|00000d20| 65 29 20 7b 0d 0d 09 09 | 09 09 63 61 73 65 20 69 |e) {....|..case i|
|00000d30| 6e 43 6f 6e 74 65 6e 74 | 3a 09 09 2f 2f 20 43 6f |nContent|:..// Co|
|00000d40| 6e 74 65 6e 74 20 61 72 | 65 61 3f 0d 09 09 09 09 |ntent ar|ea?.....|
|00000d50| 09 69 66 20 28 28 28 57 | 69 6e 64 6f 77 50 65 65 |.if (((W|indowPee|
|00000d60| 6b 29 20 74 68 65 57 69 | 6e 64 6f 77 29 2d 3e 72 |k) theWi|ndow)->r|
|00000d70| 65 66 43 6f 6e 20 3d 3d | 20 4d 79 57 69 6e 64 6f |efCon ==| MyWindo|
|00000d80| 77 49 44 29 0d 09 09 09 | 09 09 09 28 28 4f 62 6a |wID)....|...((Obj|
|00000d90| 65 63 74 57 69 6e 64 6f | 77 50 74 72 29 20 74 68 |ectWindo|wPtr) th|
|00000da0| 65 57 69 6e 64 6f 77 29 | 2d 3e 48 61 6e 64 6c 65 |eWindow)|->Handle|
|00000db0| 43 6c 69 63 6b 28 74 68 | 65 57 69 6e 64 6f 77 2c |Click(th|eWindow,|
|00000dc0| 20 74 68 65 45 76 65 6e | 74 2d 3e 77 68 65 72 65 | theEven|t->where|
|00000dd0| 2c 20 74 68 65 45 76 65 | 6e 74 29 3b 0d 09 09 09 |, theEve|nt);....|
|00000de0| 09 09 62 72 65 61 6b 3b | 0d 0d 09 09 09 09 63 61 |..break;|......ca|
|00000df0| 73 65 20 69 6e 44 72 61 | 67 3a 09 09 2f 2f 20 44 |se inDra|g:..// D|
|00000e00| 72 61 67 62 61 72 3f 0d | 09 09 09 09 09 7b 0d 09 |ragbar?.|.....{..|
|00000e10| 09 09 09 09 09 52 65 63 | 74 09 64 72 61 67 52 65 |.....Rec|t.dragRe|
|00000e20| 63 74 3b 0d 09 09 09 09 | 09 09 64 72 61 67 52 65 |ct;.....|..dragRe|
|00000e30| 63 74 20 3d 20 73 63 72 | 65 65 6e 42 69 74 73 2e |ct = scr|eenBits.|
|00000e40| 62 6f 75 6e 64 73 3b 0d | 09 09 09 09 09 09 2f 2f |bounds;.|......//|
|00000e50| 20 48 61 6e 64 6c 65 20 | 74 68 65 20 64 72 61 67 | Handle |the drag|
|00000e60| 67 69 6e 67 20 6f 66 20 | 74 68 65 20 77 69 6e 64 |ging of |the wind|
|00000e70| 6f 77 0d 09 09 09 09 09 | 09 44 72 61 67 57 69 6e |ow......|.DragWin|
|00000e80| 64 6f 77 28 74 68 65 57 | 69 6e 64 6f 77 2c 20 74 |dow(theW|indow, t|
|00000e90| 68 65 45 76 65 6e 74 2d | 3e 77 68 65 72 65 2c 20 |heEvent-|>where, |
|00000ea0| 26 64 72 61 67 52 65 63 | 74 29 3b 0d 09 09 09 09 |&dragRec|t);.....|
|00000eb0| 09 09 69 66 20 28 21 28 | 28 4f 62 6a 65 63 74 57 |..if (!(|(ObjectW|
|00000ec0| 69 6e 64 6f 77 50 74 72 | 29 20 74 68 65 57 69 6e |indowPtr|) theWin|
|00000ed0| 64 6f 77 29 2d 3e 66 6c | 6f 61 74 69 6e 67 29 0d |dow)->fl|oating).|
|00000ee0| 09 09 09 09 09 09 09 53 | 65 6c 65 63 74 57 69 6e |.......S|electWin|
|00000ef0| 64 6f 77 28 74 68 65 57 | 69 6e 64 6f 77 29 3b 0d |dow(theW|indow);.|
|00000f00| 09 09 09 09 09 7d 0d 09 | 09 09 09 09 62 72 65 61 |.....}..|....brea|
|00000f10| 6b 3b 0d 0d 09 09 09 09 | 20 63 61 73 65 20 69 6e |k;......| case in|
|00000f20| 47 6f 41 77 61 79 3a 09 | 09 09 09 09 09 2f 2f 20 |GoAway:.|.....// |
|00000f30| 63 6c 6f 73 65 20 62 6f | 78 3f 0d 09 09 09 20 20 |close bo|x?.... |
|00000f40| 09 09 69 66 20 28 54 72 | 61 63 6b 47 6f 41 77 61 |..if (Tr|ackGoAwa|
|00000f50| 79 28 74 68 65 57 69 6e | 64 6f 77 2c 20 74 68 65 |y(theWin|dow, the|
|00000f60| 45 76 65 6e 74 2d 3e 77 | 68 65 72 65 29 29 20 7b |Event->w|here)) {|
|00000f70| 0d 09 09 09 09 09 09 2f | 2f 20 49 66 20 6d 6f 75 |......./|/ If mou|
|00000f80| 73 65 20 69 73 20 72 65 | 6c 65 61 73 65 64 20 69 |se is re|leased i|
|00000f90| 6e 73 69 64 65 20 74 68 | 65 20 63 6c 6f 73 65 20 |nside th|e close |
|00000fa0| 62 6f 78 0d 09 09 09 09 | 09 09 2f 2f 20 48 69 64 |box.....|..// Hid|
|00000fb0| 65 20 6f 72 20 63 6c 6f | 73 65 20 74 68 65 20 77 |e or clo|se the w|
|00000fc0| 69 6e 64 6f 77 0d 09 09 | 09 09 09 20 20 09 69 66 |indow...|... .if|
|00000fd0| 20 28 28 28 57 69 6e 64 | 6f 77 50 65 65 6b 29 20 | (((Wind|owPeek) |
|00000fe0| 74 68 65 57 69 6e 64 6f | 77 29 2d 3e 72 65 66 43 |theWindo|w)->refC|
|00000ff0| 6f 6e 20 3d 3d 20 4d 79 | 57 69 6e 64 6f 77 49 44 |on == My|WindowID|
|00001000| 29 0d 09 09 09 09 09 09 | 09 43 6c 6f 73 65 45 64 |).......|.CloseEd|
|00001010| 69 74 57 69 6e 64 6f 77 | 28 74 68 65 57 69 6e 64 |itWindow|(theWind|
|00001020| 6f 77 29 3b 0d 09 09 09 | 09 09 09 65 6c 73 65 20 |ow);....|...else |
|00001030| 69 66 20 28 74 68 65 57 | 69 6e 64 6f 77 20 3d 3d |if (theW|indow ==|
|00001040| 20 67 53 65 61 72 63 68 | 57 69 6e 29 20 7b 0d 09 | gSearch|Win) {..|
|00001050| 09 09 09 09 09 09 44 69 | 73 70 6f 73 44 69 61 6c |......Di|sposDial|
|00001060| 6f 67 28 67 53 65 61 72 | 63 68 57 69 6e 29 3b 0d |og(gSear|chWin);.|
|00001070| 09 09 09 09 09 09 09 67 | 53 65 61 72 63 68 57 69 |.......g|SearchWi|
|00001080| 6e 20 3d 20 4e 55 4c 4c | 3b 0d 09 09 09 09 09 09 |n = NULL|;.......|
|00001090| 7d 0d 09 09 09 09 09 09 | 4d 79 41 64 6a 75 73 74 |}.......|MyAdjust|
|000010a0| 4d 65 6e 75 73 28 29 3b | 0d 09 09 09 09 09 7d 0d |Menus();|......}.|
|000010b0| 09 09 09 09 20 20 09 62 | 72 65 61 6b 3b 0d 0d 09 |.... .b|reak;...|
|000010c0| 09 09 09 63 61 73 65 20 | 69 6e 47 72 6f 77 3a 09 |...case |inGrow:.|
|000010d0| 09 09 09 09 09 2f 2f 20 | 47 72 6f 77 20 62 6f 78 |.....// |Grow box|
|000010e0| 3f 0d 09 09 09 09 09 7b | 0d 09 09 09 09 09 09 6c |?......{|.......l|
|000010f0| 6f 6e 67 09 67 72 6f 77 | 52 65 73 75 6c 74 3b 0d |ong.grow|Result;.|
|00001100| 09 09 09 09 09 09 52 65 | 63 74 09 67 72 6f 77 52 |......Re|ct.growR|
|00001110| 65 63 74 3b 0d 0d 09 09 | 09 09 09 09 53 65 6c 65 |ect;....|....Sele|
|00001120| 63 74 57 69 6e 64 6f 77 | 28 74 68 65 57 69 6e 64 |ctWindow|(theWind|
|00001130| 6f 77 29 3b 0d 0d 09 09 | 09 09 09 09 53 65 74 52 |ow);....|....SetR|
|00001140| 65 63 74 28 26 67 72 6f | 77 52 65 63 74 2c 4d 61 |ect(&gro|wRect,Ma|
|00001150| 78 57 69 6e 64 6f 77 57 | 69 64 74 68 2b 53 42 61 |xWindowW|idth+SBa|
|00001160| 72 53 69 7a 65 2d 31 2c | 36 34 2c 0d 09 09 09 09 |rSize-1,|64,.....|
|00001170| 09 09 09 09 4d 61 78 57 | 69 6e 64 6f 77 57 69 64 |....MaxW|indowWid|
|00001180| 74 68 2b 53 42 61 72 53 | 69 7a 65 2d 31 2c 67 4d |th+SBarS|ize-1,gM|
|00001190| 61 78 48 65 69 67 68 74 | 29 3b 0d 0d 09 09 09 09 |axHeight|);......|
|000011a0| 09 09 2f 2f 20 48 61 6e | 64 6c 65 20 74 68 65 20 |..// Han|dle the |
|000011b0| 6d 6f 75 73 65 20 74 72 | 61 63 6b 69 6e 67 20 66 |mouse tr|acking f|
|000011c0| 6f 72 20 74 68 65 20 72 | 65 73 69 7a 69 6e 67 0d |or the r|esizing.|
|000011d0| 09 09 09 09 09 09 67 72 | 6f 77 52 65 73 75 6c 74 |......gr|owResult|
|000011e0| 20 3d 20 47 72 6f 77 57 | 69 6e 64 6f 77 28 74 68 | = GrowW|indow(th|
|000011f0| 65 57 69 6e 64 6f 77 2c | 74 68 65 45 76 65 6e 74 |eWindow,|theEvent|
|00001200| 2d 3e 77 68 65 72 65 2c | 26 67 72 6f 77 52 65 63 |->where,|&growRec|
|00001210| 74 29 3b 0d 0d 09 09 09 | 09 09 09 2f 2f 20 43 68 |t);.....|...// Ch|
|00001220| 61 6e 67 65 20 74 68 65 | 20 73 69 7a 65 20 6f 66 |ange the| size of|
|00001230| 20 74 68 65 20 77 69 6e | 64 6f 77 0d 09 09 09 09 | the win|dow.....|
|00001240| 09 09 53 69 7a 65 57 69 | 6e 64 6f 77 28 74 68 65 |..SizeWi|ndow(the|
|00001250| 57 69 6e 64 6f 77 2c 4c | 6f 57 6f 72 64 28 67 72 |Window,L|oWord(gr|
|00001260| 6f 77 52 65 73 75 6c 74 | 29 2c 48 69 57 6f 72 64 |owResult|),HiWord|
|00001270| 28 67 72 6f 77 52 65 73 | 75 6c 74 29 2c 74 72 75 |(growRes|ult),tru|
|00001280| 65 29 3b 0d 0d 09 09 09 | 09 09 09 41 64 6a 75 73 |e);.....|...Adjus|
|00001290| 74 53 63 72 6f 6c 6c 42 | 61 72 73 28 74 68 65 57 |tScrollB|ars(theW|
|000012a0| 69 6e 64 6f 77 2c 20 74 | 72 75 65 29 3b 0d 09 09 |indow, t|rue);...|
|000012b0| 09 09 09 09 44 72 61 77 | 50 61 67 65 28 28 45 64 |....Draw|Page((Ed|
|000012c0| 69 74 57 69 6e 64 6f 77 | 50 74 72 29 20 74 68 65 |itWindow|Ptr) the|
|000012d0| 57 69 6e 64 6f 77 29 3b | 0d 0d 09 09 09 09 09 09 |Window);|........|
|000012e0| 2f 2f 20 52 65 64 72 61 | 77 20 74 68 65 20 77 69 |// Redra|w the wi|
|000012f0| 6e 64 6f 77 0d 09 09 09 | 09 09 09 53 65 74 50 6f |ndow....|...SetPo|
|00001300| 72 74 28 74 68 65 57 69 | 6e 64 6f 77 29 3b 0d 09 |rt(theWi|ndow);..|
|00001310| 09 09 09 09 20 20 09 49 | 6e 76 61 6c 52 65 63 74 |.... .I|nvalRect|
|00001320| 28 26 74 68 65 57 69 6e | 64 6f 77 2d 3e 70 6f 72 |(&theWin|dow->por|
|00001330| 74 52 65 63 74 29 3b 0d | 09 09 09 09 09 7d 0d 09 |tRect);.|.....}..|
|00001340| 09 09 09 09 62 72 65 61 | 6b 3b 0d 09 09 09 09 63 |....brea|k;.....c|
|00001350| 61 73 65 20 69 6e 5a 6f | 6f 6d 49 6e 3a 0d 09 09 |ase inZo|omIn:...|
|00001360| 09 09 63 61 73 65 20 69 | 6e 5a 6f 6f 6d 4f 75 74 |..case i|nZoomOut|
|00001370| 3a 0d 09 09 09 09 09 69 | 66 20 28 54 72 61 63 6b |:......i|f (Track|
|00001380| 42 6f 78 28 74 68 65 57 | 69 6e 64 6f 77 2c 20 74 |Box(theW|indow, t|
|00001390| 68 65 45 76 65 6e 74 2d | 3e 77 68 65 72 65 2c 20 |heEvent-|>where, |
|000013a0| 77 69 6e 64 6f 77 43 6f | 64 65 29 29 20 7b 0d 09 |windowCo|de)) {..|
|000013b0| 09 09 09 09 09 53 65 74 | 50 6f 72 74 28 74 68 65 |.....Set|Port(the|
|000013c0| 57 69 6e 64 6f 77 29 3b | 0d 09 09 09 09 09 09 45 |Window);|.......E|
|000013d0| 72 61 73 65 52 65 63 74 | 28 26 74 68 65 57 69 6e |raseRect|(&theWin|
|000013e0| 64 6f 77 2d 3e 70 6f 72 | 74 52 65 63 74 29 3b 0d |dow->por|tRect);.|
|000013f0| 09 09 09 09 09 09 5a 6f | 6f 6d 57 69 6e 64 6f 77 |......Zo|omWindow|
|00001400| 28 74 68 65 57 69 6e 64 | 6f 77 2c 20 77 69 6e 64 |(theWind|ow, wind|
|00001410| 6f 77 43 6f 64 65 2c 20 | 74 72 75 65 29 3b 0d 09 |owCode, |true);..|
|00001420| 09 09 09 09 09 41 64 6a | 75 73 74 53 63 72 6f 6c |.....Adj|ustScrol|
|00001430| 6c 42 61 72 73 28 74 68 | 65 57 69 6e 64 6f 77 2c |lBars(th|eWindow,|
|00001440| 20 74 72 75 65 29 3b 0d | 09 09 09 09 09 09 44 72 | true);.|......Dr|
|00001450| 61 77 50 61 67 65 28 28 | 45 64 69 74 57 69 6e 64 |awPage((|EditWind|
|00001460| 6f 77 50 74 72 29 20 74 | 68 65 57 69 6e 64 6f 77 |owPtr) t|heWindow|
|00001470| 29 3b 0d 09 09 09 09 09 | 09 2f 2f 20 52 65 64 72 |);......|.// Redr|
|00001480| 61 77 20 74 68 65 20 77 | 69 6e 64 6f 77 0d 09 09 |aw the w|indow...|
|00001490| 09 09 09 09 53 65 74 50 | 6f 72 74 28 74 68 65 57 |....SetP|ort(theW|
|000014a0| 69 6e 64 6f 77 29 3b 0d | 09 09 09 09 09 20 20 09 |indow);.|..... .|
|000014b0| 49 6e 76 61 6c 52 65 63 | 74 28 26 74 68 65 57 69 |InvalRec|t(&theWi|
|000014c0| 6e 64 6f 77 2d 3e 70 6f | 72 74 52 65 63 74 29 3b |ndow->po|rtRect);|
|000014d0| 0d 09 09 09 09 09 7d 0d | 09 09 09 09 7d 0d 09 09 |......}.|....}...|
|000014e0| 09 7d 0d 09 09 09 62 72 | 65 61 6b 3b 0d 09 09 7d |.}....br|eak;...}|
|000014f0| 0d 09 09 62 72 65 61 6b | 3b 0d 09 09 0d 09 2f 2f |...break|;.....//|
|00001500| 20 57 61 73 20 61 20 6b | 65 79 20 70 72 65 73 73 | Was a k|ey press|
|00001510| 65 64 3f 0d 09 63 61 73 | 65 20 6b 65 79 44 6f 77 |ed?..cas|e keyDow|
|00001520| 6e 3a 20 0d 09 63 61 73 | 65 20 61 75 74 6f 4b 65 |n: ..cas|e autoKe|
|00001530| 79 3a 0d 09 09 2f 2f 20 | 57 61 73 20 74 68 65 20 |y:...// |Was the |
|00001540| 63 6d 64 2d 6b 65 79 20 | 62 65 69 6e 67 20 68 65 |cmd-key |being he|
|00001550| 6c 64 20 64 6f 77 6e 3f | 20 20 49 66 20 73 6f 2c |ld down?| If so,|
|00001560| 20 70 72 6f 63 65 73 73 | 20 6d 65 6e 75 20 62 61 | process| menu ba|
|00001570| 72 20 73 68 6f 72 74 20 | 63 75 74 73 2e 0d 09 20 |r short |cuts... |
|00001580| 20 20 20 69 66 20 28 28 | 74 68 65 45 76 65 6e 74 | if ((|theEvent|
|00001590| 2d 3e 6d 6f 64 69 66 69 | 65 72 73 20 26 20 63 6d |->modifi|ers & cm|
|000015a0| 64 4b 65 79 29 20 21 3d | 20 30 29 20 7b 0d 09 20 |dKey) !=| 0) {.. |
|000015b0| 20 20 20 20 20 4d 79 41 | 64 6a 75 73 74 4d 65 6e | MyA|djustMen|
|000015c0| 75 73 28 29 3b 0d 09 09 | 20 20 4d 79 48 61 6e 64 |us();...| MyHand|
|000015d0| 6c 65 4d 65 6e 75 28 4d | 65 6e 75 4b 65 79 28 28 |leMenu(M|enuKey((|
|000015e0| 63 68 61 72 29 20 28 74 | 68 65 45 76 65 6e 74 2d |char) (t|heEvent-|
|000015f0| 3e 6d 65 73 73 61 67 65 | 20 26 20 63 68 61 72 43 |>message| & charC|
|00001600| 6f 64 65 4d 61 73 6b 29 | 29 29 3b 0d 09 09 7d 0d |odeMask)|));...}.|
|00001610| 09 09 65 6c 73 65 20 7b | 0d 09 09 09 74 68 65 57 |..else {|....theW|
|00001620| 69 6e 64 6f 77 20 3d 20 | 46 72 6f 6e 74 57 69 6e |indow = |FrontWin|
|00001630| 64 6f 77 28 29 3b 0d 09 | 09 09 69 66 20 28 28 28 |dow();..|..if (((|
|00001640| 57 69 6e 64 6f 77 50 65 | 65 6b 29 20 74 68 65 57 |WindowPe|ek) theW|
|00001650| 69 6e 64 6f 77 29 2d 3e | 72 65 66 43 6f 6e 20 3d |indow)->|refCon =|
|00001660| 3d 20 4d 79 57 69 6e 64 | 6f 77 49 44 20 26 26 0d |= MyWind|owID &&.|
|00001670| 09 09 09 09 28 28 4f 62 | 6a 65 63 74 57 69 6e 64 |....((Ob|jectWind|
|00001680| 6f 77 50 74 72 29 20 74 | 68 65 57 69 6e 64 6f 77 |owPtr) t|heWindow|
|00001690| 29 2d 3e 50 72 6f 63 65 | 73 73 4b 65 79 20 21 3d |)->Proce|ssKey !=|
|000016a0| 20 4e 55 4c 4c 29 0d 09 | 09 09 09 28 28 4f 62 6a | NULL)..|...((Obj|
|000016b0| 65 63 74 57 69 6e 64 6f | 77 50 74 72 29 20 74 68 |ectWindo|wPtr) th|
|000016c0| 65 57 69 6e 64 6f 77 29 | 2d 3e 50 72 6f 63 65 73 |eWindow)|->Proces|
|000016d0| 73 4b 65 79 28 74 68 65 | 57 69 6e 64 6f 77 2c 20 |sKey(the|Window, |
|000016e0| 74 68 65 45 76 65 6e 74 | 29 3b 0d 09 09 7d 0d 09 |theEvent|);...}..|
|000016f0| 09 62 72 65 61 6b 3b 0d | 0d 09 2f 2f 20 44 6f 65 |.break;.|..// Doe|
|00001700| 73 20 61 20 77 69 6e 64 | 6f 77 20 6e 65 65 64 20 |s a wind|ow need |
|00001710| 74 6f 20 62 65 20 72 65 | 64 72 61 77 6e 3f 0d 09 |to be re|drawn?..|
|00001720| 63 61 73 65 20 75 70 64 | 61 74 65 45 76 74 3a 0d |case upd|ateEvt:.|
|00001730| 09 09 74 68 65 57 69 6e | 64 6f 77 20 3d 20 28 57 |..theWin|dow = (W|
|00001740| 69 6e 64 6f 77 50 74 72 | 29 20 74 68 65 45 76 65 |indowPtr|) theEve|
|00001750| 6e 74 2d 3e 6d 65 73 73 | 61 67 65 3b 0d 09 09 69 |nt->mess|age;...i|
|00001760| 66 20 28 28 28 57 69 6e | 64 6f 77 50 65 65 6b 29 |f (((Win|dowPeek)|
|00001770| 20 74 68 65 57 69 6e 64 | 6f 77 29 2d 3e 72 65 66 | theWind|ow)->ref|
|00001780| 43 6f 6e 20 3d 3d 20 4d | 79 57 69 6e 64 6f 77 49 |Con == M|yWindowI|
|00001790| 44 29 0d 09 09 09 28 28 | 4f 62 6a 65 63 74 57 69 |D)....((|ObjectWi|
|000017a0| 6e 64 6f 77 50 74 72 29 | 20 74 68 65 57 69 6e 64 |ndowPtr)| theWind|
|000017b0| 6f 77 29 2d 3e 55 70 64 | 61 74 65 28 74 68 65 57 |ow)->Upd|ate(theW|
|000017c0| 69 6e 64 6f 77 29 3b 0d | 09 20 20 20 20 62 72 65 |indow);.|. bre|
|000017d0| 61 6b 3b 0d 0d 09 2f 2f | 20 48 61 73 20 61 20 77 |ak;...//| Has a w|
|000017e0| 69 6e 64 6f 77 20 62 65 | 65 6e 20 61 63 74 69 76 |indow be|en activ|
|000017f0| 61 74 65 64 20 6f 72 20 | 64 65 61 63 74 69 76 61 |ated or |deactiva|
|00001800| 74 65 64 3f 0d 09 63 61 | 73 65 20 61 63 74 69 76 |ted?..ca|se activ|
|00001810| 61 74 65 45 76 74 3a 0d | 09 09 74 68 65 57 69 6e |ateEvt:.|..theWin|
|00001820| 64 6f 77 20 3d 20 28 57 | 69 6e 64 6f 77 50 74 72 |dow = (W|indowPtr|
|00001830| 29 20 74 68 65 45 76 65 | 6e 74 2d 3e 6d 65 73 73 |) theEve|nt->mess|
|00001840| 61 67 65 3b 0d 0d 09 09 | 2f 2f 20 46 6f 72 63 65 |age;....|// Force|
|00001850| 20 69 74 20 74 6f 20 62 | 65 20 72 65 64 72 61 77 | it to b|e redraw|
|00001860| 6e 0d 09 09 69 66 20 28 | 28 28 57 69 6e 64 6f 77 |n...if (|((Window|
|00001870| 50 65 65 6b 29 20 74 68 | 65 57 69 6e 64 6f 77 29 |Peek) th|eWindow)|
|00001880| 2d 3e 72 65 66 43 6f 6e | 20 3d 3d 20 4d 79 57 69 |->refCon| == MyWi|
|00001890| 6e 64 6f 77 49 44 29 0d | 09 09 09 28 28 4f 62 6a |ndowID).|...((Obj|
|000018a0| 65 63 74 57 69 6e 64 6f | 77 50 74 72 29 20 74 68 |ectWindo|wPtr) th|
|000018b0| 65 57 69 6e 64 6f 77 29 | 2d 3e 41 63 74 69 76 61 |eWindow)|->Activa|
|000018c0| 74 65 28 74 68 65 57 69 | 6e 64 6f 77 2c 28 74 68 |te(theWi|ndow,(th|
|000018d0| 65 45 76 65 6e 74 2d 3e | 6d 6f 64 69 66 69 65 72 |eEvent->|modifier|
|000018e0| 73 20 26 20 61 63 74 69 | 76 65 46 6c 61 67 29 20 |s & acti|veFlag) |
|000018f0| 3e 20 30 29 3b 0d 0d 09 | 09 62 72 65 61 6b 3b 0d |> 0);...|.break;.|
|00001900| 09 63 61 73 65 20 6f 73 | 45 76 74 3a 0d 09 09 2f |.case os|Evt:.../|
|00001910| 2f 20 46 6f 72 63 65 20 | 69 74 20 74 6f 20 62 65 |/ Force |it to be|
|00001920| 20 72 65 64 72 61 77 6e | 0d 09 09 73 77 69 74 63 | redrawn|...switc|
|00001930| 68 20 28 74 68 65 45 76 | 65 6e 74 2d 3e 6d 65 73 |h (theEv|ent->mes|
|00001940| 73 61 67 65 20 3e 3e 20 | 32 34 29 20 7b 0d 09 09 |sage >> |24) {...|
|00001950| 63 61 73 65 20 73 75 73 | 70 65 6e 64 52 65 73 75 |case sus|pendResu|
|00001960| 6d 65 4d 65 73 73 61 67 | 65 3a 0d 09 09 09 74 68 |meMessag|e:....th|
|00001970| 65 57 69 6e 64 6f 77 20 | 3d 20 46 72 6f 6e 74 57 |eWindow |= FrontW|
|00001980| 69 6e 64 6f 77 28 29 3b | 0d 09 09 09 69 66 20 28 |indow();|....if (|
|00001990| 74 68 65 57 69 6e 64 6f | 77 20 26 26 20 28 28 57 |theWindo|w && ((W|
|000019a0| 69 6e 64 6f 77 50 65 65 | 6b 29 20 74 68 65 57 69 |indowPee|k) theWi|
|000019b0| 6e 64 6f 77 29 2d 3e 72 | 65 66 43 6f 6e 20 3d 3d |ndow)->r|efCon ==|
|000019c0| 20 4d 79 57 69 6e 64 6f | 77 49 44 29 0d 09 09 09 | MyWindo|wID)....|
|000019d0| 09 28 28 4f 62 6a 65 63 | 74 57 69 6e 64 6f 77 50 |.((Objec|tWindowP|
|000019e0| 74 72 29 20 74 68 65 57 | 69 6e 64 6f 77 29 2d 3e |tr) theW|indow)->|
|000019f0| 41 63 74 69 76 61 74 65 | 28 74 68 65 57 69 6e 64 |Activate|(theWind|
|00001a00| 6f 77 2c 28 74 68 65 45 | 76 65 6e 74 2d 3e 6d 65 |ow,(theE|vent->me|
|00001a10| 73 73 61 67 65 20 26 20 | 72 65 73 75 6d 65 46 6c |ssage & |resumeFl|
|00001a20| 61 67 29 20 3e 20 30 29 | 3b 0d 09 09 09 62 72 65 |ag) > 0)|;....bre|
|00001a30| 61 6b 3b 0d 09 09 7d 0d | 09 09 62 72 65 61 6b 3b |ak;...}.|..break;|
|00001a40| 09 09 0d 09 63 61 73 65 | 20 6b 48 69 67 68 4c 65 |....case| kHighLe|
|00001a50| 76 65 6c 45 76 65 6e 74 | 3a 0d 09 09 69 66 20 28 |velEvent|:...if (|
|00001a60| 67 53 79 73 37 46 6c 61 | 67 29 0d 09 09 09 41 45 |gSys7Fla|g)....AE|
|00001a70| 50 72 6f 63 65 73 73 41 | 70 70 6c 65 45 76 65 6e |ProcessA|ppleEven|
|00001a80| 74 28 74 68 65 45 76 65 | 6e 74 29 3b 0d 09 09 62 |t(theEve|nt);...b|
|00001a90| 72 65 61 6b 3b 0d 20 20 | 20 20 7d 0d 7d 09 20 20 |reak;. | }.}. |
|00001aa0| 20 20 0d 0d 2f 2f 20 44 | 6f 20 49 64 6c 65 20 54 | ..// D|o Idle T|
|00001ab0| 69 6d 65 20 50 72 6f 63 | 65 73 73 69 6e 67 0d 0d |ime Proc|essing..|
|00001ac0| 76 6f 69 64 20 49 64 6c | 65 4f 62 6a 65 63 74 73 |void Idl|eObjects|
|00001ad0| 28 45 76 65 6e 74 52 65 | 63 6f 72 64 20 2a 65 72 |(EventRe|cord *er|
|00001ae0| 29 0d 7b 0d 09 57 69 6e | 64 6f 77 50 65 65 6b 09 |).{..Win|dowPeek.|
|00001af0| 74 68 65 57 69 6e 3b 0d | 09 74 68 65 57 69 6e 20 |theWin;.|.theWin |
|00001b00| 3d 20 28 57 69 6e 64 6f | 77 50 65 65 6b 29 20 46 |= (Windo|wPeek) F|
|00001b10| 72 6f 6e 74 57 69 6e 64 | 6f 77 28 29 3b 0d 09 77 |rontWind|ow();..w|
|00001b20| 68 69 6c 65 20 28 74 68 | 65 57 69 6e 29 20 7b 0d |hile (th|eWin) {.|
|00001b30| 09 09 69 66 20 28 74 68 | 65 57 69 6e 2d 3e 72 65 |..if (th|eWin->re|
|00001b40| 66 43 6f 6e 20 3d 3d 20 | 4d 79 57 69 6e 64 6f 77 |fCon == |MyWindow|
|00001b50| 49 44 20 26 26 0d 09 09 | 09 28 28 4f 62 6a 65 63 |ID &&...|.((Objec|
|00001b60| 74 57 69 6e 64 6f 77 50 | 74 72 29 20 74 68 65 57 |tWindowP|tr) theW|
|00001b70| 69 6e 29 2d 3e 49 64 6c | 65 29 0d 09 09 09 28 28 |in)->Idl|e)....((|
|00001b80| 4f 62 6a 65 63 74 57 69 | 6e 64 6f 77 50 74 72 29 |ObjectWi|ndowPtr)|
|00001b90| 20 74 68 65 57 69 6e 29 | 2d 3e 49 64 6c 65 28 28 | theWin)|->Idle((|
|00001ba0| 57 69 6e 64 6f 77 50 74 | 72 29 20 74 68 65 57 69 |WindowPt|r) theWi|
|00001bb0| 6e 2c 20 65 72 29 3b 0d | 09 09 74 68 65 57 69 6e |n, er);.|..theWin|
|00001bc0| 20 3d 20 74 68 65 57 69 | 6e 2d 3e 6e 65 78 74 57 | = theWi|n->nextW|
|00001bd0| 69 6e 64 6f 77 3b 0d 09 | 7d 0d 7d 0d 0d 0d 0d 42 |indow;..|}.}....B|
|00001be0| 6f 6f 6c 65 61 6e 20 47 | 6f 74 52 65 71 75 69 72 |oolean G|otRequir|
|00001bf0| 65 64 50 61 72 61 6d 73 | 28 41 70 70 6c 65 45 76 |edParams|(AppleEv|
|00001c00| 65 6e 74 20 2a 74 68 65 | 45 76 65 6e 74 29 0d 7b |ent *the|Event).{|
|00001c10| 0d 20 20 20 44 65 73 63 | 54 79 70 65 20 72 65 74 |. Desc|Type ret|
|00001c20| 75 72 6e 65 64 54 79 70 | 65 3b 0d 20 20 20 53 69 |urnedTyp|e;. Si|
|00001c30| 7a 65 20 09 61 63 74 75 | 61 6c 53 69 7a 65 3b 0d |ze .actu|alSize;.|
|00001c40| 20 20 20 4f 53 45 72 72 | 09 65 72 72 3b 0d 20 20 | OSErr|.err;. |
|00001c50| 20 65 72 72 20 3d 20 41 | 45 47 65 74 41 74 74 72 | err = A|EGetAttr|
|00001c60| 69 62 75 74 65 50 74 72 | 20 28 20 74 68 65 45 76 |ibutePtr| ( theEv|
|00001c70| 65 6e 74 2c 20 6b 65 79 | 4d 69 73 73 65 64 4b 65 |ent, key|MissedKe|
|00001c80| 79 77 6f 72 64 41 74 74 | 72 2c 20 0d 09 09 09 09 |ywordAtt|r, .....|
|00001c90| 09 09 74 79 70 65 57 69 | 6c 64 43 61 72 64 2c 20 |..typeWi|ldCard, |
|00001ca0| 26 72 65 74 75 72 6e 65 | 64 54 79 70 65 2c 20 4e |&returne|dType, N|
|00001cb0| 55 4c 4c 2c 20 30 2c 20 | 0d 09 09 09 09 09 09 26 |ULL, 0, |.......&|
|00001cc0| 61 63 74 75 61 6c 53 69 | 7a 65 29 3b 0d 20 20 20 |actualSi|ze);. |
|00001cd0| 0d 20 20 20 72 65 74 75 | 72 6e 20 65 72 72 20 3d |. retu|rn err =|
|00001ce0| 3d 20 65 72 72 41 45 44 | 65 73 63 4e 6f 74 46 6f |= errAED|escNotFo|
|00001cf0| 75 6e 64 3b 0d 20 20 20 | 0d 20 7d 09 2f 2a 20 43 |und;. |. }./* C|
|00001d00| 41 70 70 6c 65 45 76 65 | 6e 74 3a 3a 47 6f 74 52 |AppleEve|nt::GotR|
|00001d10| 65 71 75 69 72 65 64 50 | 61 72 61 6d 73 20 2a 2f |equiredP|arams */|
|00001d20| 0d 0d 0d 76 6f 69 64 20 | 44 6f 4f 70 65 6e 45 76 |...void |DoOpenEv|
|00001d30| 65 6e 74 28 41 70 70 6c | 65 45 76 65 6e 74 20 2a |ent(Appl|eEvent *|
|00001d40| 74 68 65 45 76 65 6e 74 | 29 0d 7b 0d 09 48 61 6e |theEvent|).{..Han|
|00001d50| 64 6c 65 09 09 64 6f 63 | 4c 69 73 74 20 3d 20 4e |dle..doc|List = N|
|00001d60| 55 4c 4c 3b 0d 09 6c 6f | 6e 67 09 09 69 2c 20 6e |ULL;..lo|ng..i, n|
|00001d70| 75 6d 44 6f 63 73 3b 0d | 09 46 53 53 70 65 63 09 |umDocs;.|.FSSpec.|
|00001d80| 09 6d 79 46 53 53 3b 0d | 09 44 65 73 63 54 79 70 |.myFSS;.|.DescTyp|
|00001d90| 65 09 65 76 65 6e 74 49 | 44 3b 0d 09 41 45 44 65 |e.eventI|D;..AEDe|
|00001da0| 73 63 4c 69 73 74 09 74 | 68 65 4c 69 73 74 3b 0d |scList.t|heList;.|
|00001db0| 09 41 45 4b 65 79 77 6f | 72 64 09 61 65 4b 65 79 |.AEKeywo|rd.aeKey|
|00001dc0| 77 6f 72 64 3d 6b 65 79 | 44 69 72 65 63 74 4f 62 |word=key|DirectOb|
|00001dd0| 6a 65 63 74 3b 0d 09 6c | 6f 6e 67 09 09 69 74 65 |ject;..l|ong..ite|
|00001de0| 6d 43 6f 75 6e 74 3b 0d | 09 44 65 73 63 54 79 70 |mCount;.|.DescTyp|
|00001df0| 65 09 61 63 74 75 61 6c | 54 79 70 65 3b 0d 09 53 |e.actual|Type;..S|
|00001e00| 69 7a 65 09 09 61 63 74 | 75 61 6c 53 69 7a 65 3b |ize..act|ualSize;|
|00001e10| 0d 09 4f 53 45 72 72 09 | 09 6f 65 3b 0d 0d 09 69 |..OSErr.|.oe;...i|
|00001e20| 66 20 28 28 6f 65 20 3d | 20 41 45 47 65 74 50 61 |f ((oe =| AEGetPa|
|00001e30| 72 61 6d 44 65 73 63 28 | 20 74 68 65 45 76 65 6e |ramDesc(| theEven|
|00001e40| 74 2c 20 6b 65 79 44 69 | 72 65 63 74 4f 62 6a 65 |t, keyDi|rectObje|
|00001e50| 63 74 2c 20 74 79 70 65 | 41 45 4c 69 73 74 2c 20 |ct, type|AEList, |
|00001e60| 26 74 68 65 4c 69 73 74 | 29 29 20 21 3d 20 6e 6f |&theList|)) != no|
|00001e70| 45 72 72 29 20 7b 0d 09 | 09 44 65 62 75 67 53 74 |Err) {..|.DebugSt|
|00001e80| 72 28 22 5c 70 41 45 47 | 65 74 50 61 72 61 6d 44 |r("\pAEG|etParamD|
|00001e90| 65 73 63 22 29 3b 0d 09 | 09 72 65 74 75 72 6e 3b |esc");..|.return;|
|00001ea0| 0d 09 7d 0d 0d 0d 09 69 | 66 20 28 21 47 6f 74 52 |..}....i|f (!GotR|
|00001eb0| 65 71 75 69 72 65 64 50 | 61 72 61 6d 73 28 74 68 |equiredP|arams(th|
|00001ec0| 65 45 76 65 6e 74 29 29 | 20 7b 0d 09 09 44 65 62 |eEvent))| {...Deb|
|00001ed0| 75 67 53 74 72 28 22 5c | 70 47 6f 74 52 65 71 75 |ugStr("\|pGotRequ|
|00001ee0| 69 72 65 64 50 61 72 61 | 6d 73 22 29 3b 0d 09 09 |iredPara|ms");...|
|00001ef0| 72 65 74 75 72 6e 3b 0d | 09 7d 0d 0d 09 69 66 20 |return;.|.}...if |
|00001f00| 28 28 6f 65 20 3d 20 41 | 45 43 6f 75 6e 74 49 74 |((oe = A|ECountIt|
|00001f10| 65 6d 73 28 20 26 74 68 | 65 4c 69 73 74 2c 20 26 |ems( &th|eList, &|
|00001f20| 69 74 65 6d 43 6f 75 6e | 74 29 29 20 21 3d 20 6e |itemCoun|t)) != n|
|00001f30| 6f 45 72 72 29 20 7b 0d | 09 09 44 65 62 75 67 53 |oErr) {.|..DebugS|
|00001f40| 74 72 28 22 5c 70 41 45 | 43 6f 75 6e 74 49 74 65 |tr("\pAE|CountIte|
|00001f50| 6d 73 22 29 3b 0d 09 09 | 72 65 74 75 72 6e 3b 0d |ms");...|return;.|
|00001f60| 09 7d 0d 0d 0d 09 66 6f | 72 20 28 69 20 3d 20 31 |.}....fo|r (i = 1|
|00001f70| 3b 20 69 20 3c 3d 20 69 | 74 65 6d 43 6f 75 6e 74 |; i <= i|temCount|
|00001f80| 3b 20 69 2b 2b 29 0d 09 | 7b 0d 09 09 6f 65 20 3d |; i++)..|{...oe =|
|00001f90| 20 41 45 47 65 74 4e 74 | 68 50 74 72 28 20 26 74 | AEGetNt|hPtr( &t|
|00001fa0| 68 65 4c 69 73 74 2c 20 | 69 2c 20 74 79 70 65 46 |heList, |i, typeF|
|00001fb0| 53 53 2c 20 26 61 65 4b | 65 79 77 6f 72 64 2c 20 |SS, &aeK|eyword, |
|00001fc0| 26 61 63 74 75 61 6c 54 | 79 70 65 2c 0d 09 09 09 |&actualT|ype,....|
|00001fd0| 09 09 09 28 50 74 72 29 | 20 26 6d 79 46 53 53 2c |...(Ptr)| &myFSS,|
|00001fe0| 20 73 69 7a 65 6f 66 28 | 20 46 53 53 70 65 63 29 | sizeof(| FSSpec)|
|00001ff0| 2c 20 26 61 63 74 75 61 | 6c 53 69 7a 65 29 3b 0d |, &actua|lSize);.|
|00002000| 0d 09 09 69 66 20 28 6f | 65 20 3d 3d 20 6e 6f 45 |...if (o|e == noE|
|00002010| 72 72 29 20 7b 0d 09 09 | 09 4f 70 65 6e 45 64 69 |rr) {...|.OpenEdi|
|00002020| 74 57 69 6e 64 6f 77 28 | 26 6d 79 46 53 53 29 3b |tWindow(|&myFSS);|
|00002030| 0d 09 09 7d 0d 09 7d 0d | 09 41 45 44 69 73 70 6f |...}..}.|.AEDispo|
|00002040| 73 65 44 65 73 63 28 26 | 74 68 65 4c 69 73 74 29 |seDesc(&|theList)|
|00002050| 3b 0d 09 2f 2f 20 65 76 | 65 6e 74 20 77 61 73 20 |;..// ev|ent was |
|00002060| 68 61 6e 64 6c 65 64 20 | 73 75 63 63 65 73 73 66 |handled |successf|
|00002070| 75 6c 6c 79 0d 7d 0d 0d | 70 61 73 63 61 6c 20 4f |ully.}..|pascal O|
|00002080| 53 45 72 72 20 41 70 70 | 6c 65 45 76 65 6e 74 48 |SErr App|leEventH|
|00002090| 61 6e 64 6c 65 72 28 41 | 70 70 6c 65 45 76 65 6e |andler(A|ppleEven|
|000020a0| 74 20 2a 74 68 65 45 76 | 65 6e 74 2c 41 70 70 6c |t *theEv|ent,Appl|
|000020b0| 65 45 76 65 6e 74 20 2a | 72 65 70 6c 79 2c 20 6c |eEvent *|reply, l|
|000020c0| 6f 6e 67 20 72 65 66 43 | 6f 6e 29 0d 7b 09 0d 09 |ong refC|on).{...|
|000020d0| 4f 53 45 72 72 09 09 65 | 72 72 3b 0d 09 44 65 73 |OSErr..e|rr;..Des|
|000020e0| 63 54 79 70 65 09 61 63 | 74 75 61 6c 54 79 70 65 |cType.ac|tualType|
|000020f0| 3b 0d 09 53 69 7a 65 09 | 09 61 63 74 75 61 6c 53 |;..Size.|.actualS|
|00002100| 69 7a 65 3b 0d 09 44 65 | 73 63 54 79 70 65 09 65 |ize;..De|scType.e|
|00002110| 76 65 6e 74 43 6c 61 73 | 73 2c 20 65 76 65 6e 74 |ventClas|s, event|
|00002120| 49 44 3b 0d 09 4f 53 45 | 72 72 09 09 6f 65 3b 0d |ID;..OSE|rr..oe;.|
|00002130| 0d 09 69 66 20 28 28 6f | 65 20 3d 20 41 45 47 65 |..if ((o|e = AEGe|
|00002140| 74 41 74 74 72 69 62 75 | 74 65 50 74 72 28 20 28 |tAttribu|tePtr( (|
|00002150| 41 70 70 6c 65 45 76 65 | 6e 74 2a 29 20 74 68 65 |AppleEve|nt*) the|
|00002160| 45 76 65 6e 74 2c 20 6b | 65 79 45 76 65 6e 74 43 |Event, k|eyEventC|
|00002170| 6c 61 73 73 41 74 74 72 | 2c 0d 09 09 09 09 09 74 |lassAttr|,......t|
|00002180| 79 70 65 54 79 70 65 2c | 20 26 61 63 74 75 61 6c |ypeType,| &actual|
|00002190| 54 79 70 65 2c 20 28 50 | 74 72 29 20 26 65 76 65 |Type, (P|tr) &eve|
|000021a0| 6e 74 43 6c 61 73 73 2c | 20 0d 09 09 09 09 09 73 |ntClass,| ......s|
|000021b0| 69 7a 65 6f 66 28 65 76 | 65 6e 74 43 6c 61 73 73 |izeof(ev|entClass|
|000021c0| 29 2c 20 26 61 63 74 75 | 61 6c 53 69 7a 65 29 29 |), &actu|alSize))|
|000021d0| 20 21 3d 20 6e 6f 45 72 | 72 29 0d 09 09 09 72 65 | != noEr|r)....re|
|000021e0| 74 75 72 6e 20 6f 65 3b | 0d 09 09 09 09 09 09 09 |turn oe;|........|
|000021f0| 0d 09 0d 09 69 66 20 28 | 28 6f 65 20 3d 20 41 45 |....if (|(oe = AE|
|00002200| 47 65 74 41 74 74 72 69 | 62 75 74 65 50 74 72 28 |GetAttri|butePtr(|
|00002210| 20 20 28 41 70 70 6c 65 | 45 76 65 6e 74 2a 29 20 | (Apple|Event*) |
|00002220| 74 68 65 45 76 65 6e 74 | 2c 20 6b 65 79 45 76 65 |theEvent|, keyEve|
|00002230| 6e 74 49 44 41 74 74 72 | 2c 0d 09 09 09 09 09 74 |ntIDAttr|,......t|
|00002240| 79 70 65 54 79 70 65 2c | 20 26 61 63 74 75 61 6c |ypeType,| &actual|
|00002250| 54 79 70 65 2c 20 28 50 | 74 72 29 20 26 65 76 65 |Type, (P|tr) &eve|
|00002260| 6e 74 49 44 2c 20 0d 09 | 09 09 09 09 73 69 7a 65 |ntID, ..|....size|
|00002270| 6f 66 28 65 76 65 6e 74 | 49 44 29 2c 20 26 61 63 |of(event|ID), &ac|
|00002280| 74 75 61 6c 53 69 7a 65 | 29 29 20 21 3d 20 6e 6f |tualSize|)) != no|
|00002290| 45 72 72 29 0d 09 09 09 | 72 65 74 75 72 6e 20 6f |Err)....|return o|
|000022a0| 65 3b 0d 09 09 09 09 09 | 09 09 09 09 0d 09 69 66 |e;......|......if|
|000022b0| 20 28 65 76 65 6e 74 43 | 6c 61 73 73 20 3d 3d 20 | (eventC|lass == |
|000022c0| 6b 43 6f 72 65 45 76 65 | 6e 74 43 6c 61 73 73 29 |kCoreEve|ntClass)|
|000022d0| 0d 09 7b 0d 09 09 73 77 | 69 74 63 68 20 28 65 76 |..{...sw|itch (ev|
|000022e0| 65 6e 74 49 44 29 0d 09 | 09 7b 0d 09 09 63 61 73 |entID)..|.{...cas|
|000022f0| 65 20 6b 41 45 4f 70 65 | 6e 41 70 70 6c 69 63 61 |e kAEOpe|nApplica|
|00002300| 74 69 6f 6e 3a 0d 09 09 | 09 69 66 20 28 47 6f 74 |tion:...|.if (Got|
|00002310| 52 65 71 75 69 72 65 64 | 50 61 72 61 6d 73 28 74 |Required|Params(t|
|00002320| 68 65 45 76 65 6e 74 29 | 29 0d 09 09 09 7b 0d 09 |heEvent)|)....{..|
|00002330| 09 09 09 2f 2f 20 67 47 | 6f 70 68 65 72 2d 3e 44 |...// gG|opher->D|
|00002340| 6f 43 6f 6d 6d 61 6e 64 | 28 20 63 6d 64 4e 65 77 |oCommand|( cmdNew|
|00002350| 29 3b 0d 09 09 09 09 2f | 2f 20 61 6e 41 70 70 6c |);...../|/ anAppl|
|00002360| 65 45 76 65 6e 74 2d 3e | 53 65 74 45 72 72 6f 72 |eEvent->|SetError|
|00002370| 52 65 73 75 6c 74 28 20 | 6e 6f 45 72 72 29 3b 0d |Result( |noErr);.|
|00002380| 09 09 09 09 41 73 6b 45 | 64 69 74 57 69 6e 64 6f |....AskE|ditWindo|
|00002390| 77 28 29 3b 0d 09 09 09 | 7d 0d 09 09 09 62 72 65 |w();....|}....bre|
|000023a0| 61 6b 3b 0d 09 09 09 09 | 0d 09 09 63 61 73 65 20 |ak;.....|...case |
|000023b0| 6b 41 45 4f 70 65 6e 44 | 6f 63 75 6d 65 6e 74 73 |kAEOpenD|ocuments|
|000023c0| 3a 0d 09 09 09 44 6f 4f | 70 65 6e 45 76 65 6e 74 |:....DoO|penEvent|
|000023d0| 28 20 74 68 65 45 76 65 | 6e 74 29 3b 0d 09 09 09 |( theEve|nt);....|
|000023e0| 62 72 65 61 6b 3b 0d 09 | 09 09 09 0d 09 09 63 61 |break;..|......ca|
|000023f0| 73 65 20 6b 41 45 50 72 | 69 6e 74 44 6f 63 75 6d |se kAEPr|intDocum|
|00002400| 65 6e 74 73 3a 0d 09 09 | 09 62 72 65 61 6b 3b 0d |ents:...|.break;.|
|00002410| 09 09 09 0d 09 09 63 61 | 73 65 20 6b 41 45 51 75 |......ca|se kAEQu|
|00002420| 69 74 41 70 70 6c 69 63 | 61 74 69 6f 6e 3a 0d 09 |itApplic|ation:..|
|00002430| 09 09 69 66 20 28 47 6f | 74 52 65 71 75 69 72 65 |..if (Go|tRequire|
|00002440| 64 50 61 72 61 6d 73 28 | 74 68 65 45 76 65 6e 74 |dParams(|theEvent|
|00002450| 29 29 0d 09 09 09 7b 0d | 09 09 09 09 67 51 75 69 |))....{.|....gQui|
|00002460| 74 46 6c 61 67 20 3d 20 | 74 72 75 65 3b 0d 09 09 |tFlag = |true;...|
|00002470| 09 7d 0d 09 09 09 62 72 | 65 61 6b 3b 0d 09 09 7d |.}....br|eak;...}|
|00002480| 09 09 0d 09 7d 0d 09 09 | 0d 09 72 65 74 75 72 6e |....}...|..return|
|00002490| 20 6e 6f 45 72 72 3b 0d | 7d 0d 0d 0d 0d 76 6f 69 | noErr;.|}....voi|
|000024a0| 64 20 49 6e 69 74 41 70 | 70 6c 65 45 76 65 6e 74 |d InitAp|pleEvent|
|000024b0| 73 28 76 6f 69 64 29 0d | 7b 0d 09 69 66 20 28 67 |s(void).|{..if (g|
|000024c0| 53 79 73 37 46 6c 61 67 | 29 0d 09 09 41 45 49 6e |Sys7Flag|)...AEIn|
|000024d0| 73 74 61 6c 6c 45 76 65 | 6e 74 48 61 6e 64 6c 65 |stallEve|ntHandle|
|000024e0| 72 28 74 79 70 65 57 69 | 6c 64 43 61 72 64 2c 20 |r(typeWi|ldCard, |
|000024f0| 74 79 70 65 57 69 6c 64 | 43 61 72 64 2c 0d 09 09 |typeWild|Card,...|
|00002500| 09 09 09 09 09 09 28 45 | 76 65 6e 74 48 61 6e 64 |......(E|ventHand|
|00002510| 6c 65 72 50 72 6f 63 50 | 74 72 29 20 41 70 70 6c |lerProcP|tr) Appl|
|00002520| 65 45 76 65 6e 74 48 61 | 6e 64 6c 65 72 2c 0d 09 |eEventHa|ndler,..|
|00002530| 09 09 09 09 09 09 09 30 | 2c 46 41 4c 53 45 29 3b |.......0|,FALSE);|
|00002540| 0d 7d 0d 0d 76 6f 69 64 | 20 43 68 65 63 6b 45 6e |.}..void| CheckEn|
|00002550| 76 69 72 6f 6e 6d 65 6e | 74 28 76 6f 69 64 29 0d |vironmen|t(void).|
|00002560| 7b 0d 09 53 79 73 45 6e | 76 52 65 63 09 73 45 6e |{..SysEn|vRec.sEn|
|00002570| 76 3b 0d 09 4f 53 45 72 | 72 09 09 6f 65 3b 0d 0d |v;..OSEr|r..oe;..|
|00002580| 09 6f 65 20 3d 20 53 79 | 73 45 6e 76 69 72 6f 6e |.oe = Sy|sEnviron|
|00002590| 73 28 31 2c 26 73 45 6e | 76 29 3b 0d 0d 09 67 53 |s(1,&sEn|v);...gS|
|000025a0| 79 73 37 46 6c 61 67 20 | 3d 20 73 45 6e 76 2e 73 |ys7Flag |= sEnv.s|
|000025b0| 79 73 74 65 6d 56 65 72 | 73 69 6f 6e 20 3e 3d 20 |ystemVer|sion >= |
|000025c0| 30 78 30 37 30 30 3b 0d | 09 67 43 6f 6c 6f 72 51 |0x0700;.|.gColorQ|
|000025d0| 44 46 6c 61 67 20 3d 20 | 73 45 6e 76 2e 68 61 73 |DFlag = |sEnv.has|
|000025e0| 43 6f 6c 6f 72 51 44 3b | 0d 7d 0d 0d 2f 2a 20 65 |ColorQD;|.}../* e|
|000025f0| 6e 64 20 45 76 74 6c 61 | 62 2e 63 20 2a 2f 00 00 |nd Evtla|b.c */..|
|00002600| 00 00 01 00 00 00 01 cc | 00 00 00 cc 00 00 00 46 |........|.......F|
|00002610| 00 00 05 bc 07 73 6f 75 | 72 63 65 73 01 00 00 00 |.....sou|rces....|
|00002620| 00 2a 00 00 05 db a4 f5 | 12 53 a7 e9 b2 c0 00 00 |.*......|.S......|
|00002630| 06 4d 61 69 6e 2e 63 b4 | 02 00 00 00 54 45 58 54 |.Main.c.|....TEXT|
|00002640| 4b 41 48 4c 01 00 00 34 | 01 80 00 00 00 00 22 47 |KAHL...4|......"G|
|00002650| 00 00 54 45 58 54 4b 41 | 48 4c 01 00 00 34 01 80 |..TEXTKA|HL...4..|
|00002660| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002670| 00 00 9e 7d 36 20 00 00 | 25 7e 00 00 02 12 4d 6f |...}6 ..|%~....Mo|
|00002680| 6f 56 54 56 4f 44 00 00 | 00 00 00 00 00 00 00 00 |oVTVOD..|........|
|00002690| 4d eb 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |M.......|........|
|000026a0| 00 00 00 00 00 00 a7 fc | 5e 41 a7 fc 5e 41 00 00 |........|^A..^A..|
|000026b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000026f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002700| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....|
|00002710| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002720| 00 00 00 00 00 00 00 06 | 00 04 00 b9 00 37 01 a8 |........|.....7..|
|00002730| 02 2e 00 b9 00 37 01 a8 | 02 2e aa ab 68 32 00 00 |.....7..|....h2..|
|00002740| 12 34 00 00 12 3b 00 00 | 10 ec 01 00 00 00 00 7c |.4...;..|.......||
|00002750| 00 03 00 18 00 00 18 eb | 01 04 00 5a 86 08 00 00 |........|...Z....|
|00002760| 09 2a 74 68 65 45 76 65 | 6e 74 00 2e 00 00 19 4d |.*theEve|nt.....M|
|00002770| 01 06 00 5a 85 f8 00 00 | 1f 74 68 65 45 76 65 6e |...Z....|.theEven|
|00002780| 74 2d 3e 6d 65 73 73 61 | 67 65 20 26 20 72 65 73 |t->messa|ge & res|
|00002790| 75 6d 65 46 6c 61 67 20 | 00 34 00 00 18 a9 01 02 |umeFlag |.4......|
|000027a0| 00 5a 85 e8 00 00 25 28 | 74 68 65 45 76 65 6e 74 |.Z....%(|theEvent|
|000027b0| 2d 3e 6d 65 73 73 61 67 | 65 20 26 20 72 65 73 75 |->messag|e & resu|
|000027c0| 6d 65 46 6c 61 67 29 20 | 3e 20 30 20 00 00 01 00 |meFlag) |> 0 ....|
|000027d0| 00 00 01 cc 00 00 00 cc | 00 00 00 46 00 67 3e 00 |........|...F.g>.|
|000027e0| 0f cc 00 00 00 1c 00 46 | 00 01 4d 50 53 52 00 00 |.......F|..MPSR..|
|000027f0| 00 12 44 54 56 55 00 00 | 00 1e 03 ed ff ff 00 00 |..DTVU..|........|
|00002800| 00 00 00 00 00 00 49 2c | ff ff 00 00 00 4c 00 00 |......I,|.....L..|
|00002810| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002820| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002860| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00002870| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+